Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Generic function</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Generic_function"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Generic_function rootpage-Generic_function skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Generic function</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Generalized_function" title="Generalized function">Generalized function</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" ยท ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */


.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1246091330">
/* start https://en.wikipedia.org/ */


.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:115%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><table class="sidebar nomobile nowraplinks" style="width:auto"><tbody><tr><th class="sidebar-title"><a href="Polymorphism_(computer_science)" title="Polymorphism (computer science)">Polymorphism</a></th></tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Ad_hoc_polymorphism" title="Ad hoc polymorphism">Ad hoc polymorphism</a></th></tr><tr><td class="sidebar-content plainlist">
<ul><li><a href="Function_overloading" title="Function overloading">Function overloading</a></li>
<li><a href="Operator_overloading" title="Operator overloading">Operator overloading</a></li></ul></td>
</tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></th></tr><tr><td class="sidebar-content plainlist">
<ul>
<li><a href="Generic_programming" title="Generic programming">Generic programming</a></li></ul></td>
</tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Subtyping" title="Subtyping">Subtyping</a></th></tr><tr><td class="sidebar-content plainlist">
<ul><li><a href="Virtual_function" title="Virtual function">Virtual function</a></li>
<li><a href="Dynamic_dispatch" title="Dynamic dispatch">Single and dynamic dispatch</a></li>
<li><a href="Double_dispatch" title="Double dispatch">Double dispatch</a></li>
<li><a href="Multiple_dispatch" title="Multiple dispatch">Multiple dispatch</a></li>
<li><a href="Predicate_dispatch" title="Predicate dispatch">Predicate dispatch</a></li></ul></td>
</tr><tr><td class="sidebar-navbar"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></td></tr></tbody></table>
<p>In <a href="Computer_programming" title="Computer programming">computer programming</a>, a <b>generic function</b> is a function defined for <a href="Polymorphism_(computer_science)" title="Polymorphism (computer science)">polymorphism</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="In_statically_typed_languages">In statically typed languages</h2></div>
<p>In statically typed languages (such as <a href="C%2B%2B" title="C++">C++</a> and <a href="Java_(programming_language)" title="Java (programming language)">Java</a>), the term <i>generic functions</i> refers to a mechanism for <i>compile-time polymorphism</i> (<a href="Static_dispatch" title="Static dispatch">static dispatch</a>), specifically <a href="Parametric_polymorphism" title="Parametric polymorphism">parametric polymorphism</a>. These are functions defined with <a href="TypeParameter" title="TypeParameter">TypeParameters</a>, intended to be resolved with <a href="Compile_time" title="Compile time">compile time</a> type information. The compiler uses these types to instantiate suitable versions, resolving any <a href="Function_overloading" title="Function overloading">function overloading</a> appropriately.
</p>
<div class="mw-heading mw-heading2"><h2 id="In_Common_Lisp_Object_System">In Common Lisp Object System</h2></div>
<p>In some systems for <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a> such as the <a href="Common_Lisp_Object_System" title="Common Lisp Object System">Common Lisp Object System</a> (CLOS)<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> and <a href="Dylan_(programming_language)" title="Dylan (programming language)">Dylan</a>, a <i>generic function</i> is an entity made up of all methods having the same name. Typically a <i>generic function</i> is an instance of a class that <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inherits</a> both from <i>function</i> and <i>standard-object</i>. Thus generic functions are both functions (that can be called with and applied to arguments) and ordinary objects. The book <i><a href="The_Art_of_the_Metaobject_Protocol" title="The Art of the Metaobject Protocol">The Art of the Metaobject Protocol</a></i> explains the implementation and use of CLOS generic functions in detail.
</p><p>One of the early object-oriented programming extensions to Lisp is <a href="Flavors_(programming_language)" title="Flavors (programming language)">Flavors</a>. It used the usual message sending paradigm influenced by <a href="Smalltalk" title="Smalltalk">Smalltalk</a>. The Flavors syntax to send a message is:
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="p">(</span><span class="nv">send</span><span class="w"> </span><span class="nv">object</span><span class="w"> </span><span class="ss">:message</span><span class="p">)</span>
</pre></div>
<p>With New Flavors, it was decided the message should be a real function and the usual function calling syntax should be used:
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="p">(</span><span class="nv">message</span><span class="w"> </span><span class="nv">object</span><span class="p">)</span>
</pre></div>
<p><i>message</i> now is a <i>generic function</i>, an object and function in its own right. Individual implementations of the <i>message</i> are called <i>methods</i>.
</p><p>The same idea was implemented in <a href="CommonLoops" title="CommonLoops">CommonLoops</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> New Flavors and CommonLoops were the main influence for the Common Lisp Object System.
</p>
<div class="mw-heading mw-heading2"><h2 id="Example">Example</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Common_Lisp">Common Lisp</h3></div>
<p>Define a generic function with two parameters object-1 and object-2. The name of the generic function is <i>collide</i>.
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="p">(</span><span class="nb">defgeneric</span><span class="w"> </span><span class="nv">collide</span><span class="w"> </span><span class="p">(</span><span class="nv">object-1</span><span class="w"> </span><span class="nv">object-2</span><span class="p">))</span>
</pre></div>
<p>Methods belonging to the generic function are defined outside of classes.
Here we define a method for the generic function <i>collide</i> which is specialized for the classes asteroid (first parameter object-1) and spaceship (second parameter object-2). The parameters are used as normal variables inside the method body. There is no special namespace that has access to class slots.
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="p">(</span><span class="nb">defmethod</span><span class="w"> </span><span class="nv">collide</span><span class="w"> </span><span class="p">((</span><span class="nv">object-1</span><span class="w"> </span><span class="nv">asteroid</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="nv">object-2</span><span class="w"> </span><span class="nv">spaceship</span><span class="p">))</span>
<span class="w"> </span><span class="p">(</span><span class="nb">format</span><span class="w"> </span><span class="no">t</span><span class="w"> </span><span class="s">"asteroid ~a collides with spaceship ~a"</span><span class="w"> </span><span class="nv">object-1</span><span class="w"> </span><span class="nv">object-2</span><span class="p">))</span>
</pre></div>
<p>Calling the generic function:
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="nv">?</span><span class="w"> </span><span class="p">(</span><span class="nv">collide</span><span class="w"> </span><span class="p">(</span><span class="nb">make-instance</span><span class="w"> </span><span class="ss">'asteroid</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="nb">make-instance</span><span class="w"> </span><span class="ss">'spaceship</span><span class="p">))</span>
<span class="nv">asteroid</span><span class="w"> </span><span class="err">#</span><span class="nv">&lt;ASTEROID</span><span class="w"> </span><span class="nv">4020003FD3&gt;</span><span class="w"> </span><span class="nv">collides</span><span class="w"> </span><span class="nv">with</span><span class="w"> </span><span class="nv">spaceship</span><span class="w"> </span><span class="err">#</span><span class="nv">&lt;SPACESHIP</span><span class="w"> </span><span class="nv">40200048CB&gt;</span>
</pre></div>
<p>Common Lisp can also retrieve individual methods from the generic function. FIND-METHOD finds the method from the generic function <i>collide</i> specialized for the classes <i>asteroid</i> and <i>spaceship</i>.
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="nv">?</span><span class="w"> </span><span class="p">(</span><span class="nb">find-method</span><span class="w"> </span><span class="nf">#'</span><span class="nv">collide</span><span class="w"> </span><span class="no">nil</span><span class="w"> </span><span class="p">(</span><span class="nb">list</span><span class="w"> </span><span class="p">(</span><span class="nb">find-class</span><span class="w"> </span><span class="ss">'asteroid</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="nb">find-class</span><span class="w"> </span><span class="ss">'spaceship</span><span class="p">)))</span>
<span class="err">#</span><span class="nv">&lt;STANDARD-METHOD</span><span class="w"> </span><span class="nv">COLLIDE</span><span class="w"> </span><span class="no">NIL</span><span class="w"> </span><span class="p">(</span><span class="nv">ASTEROID</span><span class="w"> </span><span class="nv">SPACESHIP</span><span class="p">)</span><span class="w"> </span><span class="nv">4150015E43&gt;</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Comparison_to_other_languages">Comparison to other languages</h3></div>
<p>Generic functions correspond roughly to what <a href="Smalltalk" title="Smalltalk">Smalltalk</a> terms <a href="Method_(computer_science)" class="mw-redirect" title="Method (computer science)">methods</a>, with the notable exception that, in Smalltalk, the receiver's class is the sole determinant of which body of code is called: the types or values of the arguments are irrelevant (<a href="Single_dispatch" class="mw-redirect" title="Single dispatch">single dispatch</a>). In a programming language with <a href="Multiple_dispatch" title="Multiple dispatch">multiple dispatch</a> when a generic function is called, method dispatch occurs on the basis of all arguments, not just one which is privileged. <a href="Flavors_(programming_language)" title="Flavors (programming language)">New Flavors</a> also provided generic functions, but only single dispatch.
</p><p>In JavaScript, a generic function is a function that can work with values of different types, rather than a specific type. This is achieved through the use of type parameters or by dynamically checking the type of the value being operated on. One common use case for generic functions in JavaScript is to create reusable functions that can work with different data types, such as arrays, strings, or objects. JavaScript's dynamic typing system makes it particularly suited for the creation of generic functions, as values can be easily coerced or converted to different types as needed.
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.dreamsongs.com/Files/ECOOP.pdf">The Common Lisp Object System: An Overview</a></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110604013117/http://www2.parc.com/istl/groups/gir/papers/stefik-commonloops-oopsla66.pdf">"CommonLoops, Merging Lisp and Object-Oriented Programming"</a> <span class="cs1-format">(PDF)</span>. Archived from <a rel="nofollow" class="external text" href="https://www2.parc.com/istl/groups/gir/papers/stefik-commonloops-oopsla66.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2011-06-04<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-12-10</span></span>.</cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-03-20" href="https://en.wikipedia.org/wiki/?title=Generic_function&amp;oldid=1281442317">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>